//package com.huhao.springbootremotecallbyrabbitmq.service;
//
//import com.huhao.springbootremotecallbyrabbitmq.constants.RabbitMqConstants;
//import org.springframework.amqp.core.*;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class RabbitMQConfig {
//
//    @Bean
//    public TopicExchange exchange() {
//        return new TopicExchange(RabbitMqConstants.EXCHANGE_NAME);
//    }
//
//    @Bean
//    public Queue queue() {
//        return new Queue(RabbitMqConstants.QUEUE_NAME, true);
//    }
//
//    @Bean
//    public Binding binding(Queue queue, TopicExchange exchange) {
//        return BindingBuilder.bind(queue).to(exchange).with(RabbitMqConstants.ROUTING_KEY);
//    }
//
//    @Bean
//    public TopicExchange exchangeReply() {
//        return new TopicExchange(RabbitMqConstants.REPLY_EXCHANGE_NAME);
//    }
//
//    @Bean
//    public Queue queueReply() {
//        return new Queue(RabbitMqConstants.REPLY_QUEUE_NAME, true);
//    }
//
//    @Bean
//    public Binding bindingReply(Queue queueReply, TopicExchange exchangeReply) {
//        return BindingBuilder.bind(queueReply).to(exchangeReply).with(RabbitMqConstants.REPLY_ROUTING_KEY);
//    }
//}
